<?php if (!defined('THINK_PATH')) exit();?><!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <table border="1">
        <tr>
            <th>id</th>
            <th>名称</th>
            <th>数量</th>
            <th>重量</th>
            <th>图片</th>
            <th>链接</th>
        </tr>
        <!--<?php if(is_array($data)): $i = 0; $__LIST__ = $data;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$v): $mod = ($i % 2 );++$i;?><tr>
                <td><?php echo ($v["id"]); ?></td>
                <td><?php echo ($v["name"]); ?></td>
                <td><?php echo ($v["num"]); ?></td>
                <td><?php echo ($v["weight"]); ?></td>
            </tr><?php endforeach; endif; else: echo "" ;endif; ?>-->
        <?php if(is_array($data)): foreach($data as $key=>$v): ?><tr>
                <td><?=$v['id']?></td>
                <td><?php echo ($v["name"]); ?></td>
                <td><?php echo ($v["num"]); ?></td>
                <td><?php echo ($v["weight"]); ?></td>
                <td>
                    <?php if(empty($v['img'])): ?>暂无图片
                    <?php else: ?>
                        <img src="/Public/uploads/<?php echo ($v["img"]); ?>" /><?php endif; ?>
                </td>
                <td>
                    <?php if(empty($v["link"])): ?>暂无链接
                    <?php else: ?>
                        <a href="<?php echo ($v["link"]); ?>">链接</a><?php endif; ?>
                </td>
            </tr><?php endforeach; endif; ?>
    </table>
</body>
</html>